{% extends request.is_ajax|yesno:'bajax.html,base.html' %}
{% load i18n bootstrap3 %}
{% block main %}
<form action="{% url 'devapp:extra_data_edit' group_id object.pk %}" method="post">{% csrf_token %}
    <div class="modal-header primary">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><span class="glyphicon glyphicon-exclamation-sign"></span>{% trans 'Change extra data for device' %}</h4>
    </div>
    <div class="modal-body">
        {% bootstrap_form form %}

        <div class="btn-group btn-group-sm">
            {% bootstrap_button _('Save') button_type="submit" button_class="btn-primary" icon="save" %}

            {% if not request.is_ajax %}
                {% url 'devapp:edit' group_id object.pk as backurl %}
                {% bootstrap_button _('Back') button_type="link" href=backurl icon="fast-backward" %}
            {% endif %}
        </div>
    </div>
</form>
{% endblock %}